package com.zc.framework.shiro.bean;


import com.zc.app.sys.dao.peer.User;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by zc on 2016/8/30.
 */
public class Principal  implements Serializable {
    private static final long serialVersionUID = 1L;
    private String id;
    private String loginName;
    private String name;
    private Map<String, Object> cacheMap;

    public Principal(User user) {
//        this.id = user.getAccountId();
        this.loginName = user.getLoginName();
//        this.name = user.getName();
    }

    public String getId() {
        return this.id;
    }

    public String getLoginName() {
        return this.loginName;
    }

    public String getName() {
        return this.name;
    }

    public Map<String, Object> getCacheMap() {
        if(this.cacheMap == null) {
            this.cacheMap = new HashMap();
        }

        return this.cacheMap;
    }
}
